package chpt02;

import java.util.Scanner;

enum Grade{A,B,C,D,E}

public class GetGrade {

	public static void main(String[] args) {

		Scanner sc=new Scanner(System.in);
		while(sc.hasNext()){
			int score=sc.nextInt();
			switch(getGrade(score)){
			case A:System.out.println("Excellent");
			printGradeInfo(Grade.A);break;
			case B:System.out.println("Good");
			printGradeInfo(Grade.B);break;
			case C:System.out.println("Average");
			printGradeInfo(Grade.C);break;
			case D:System.out.println("Fair");
			printGradeInfo(Grade.D);break;
			case E:System.out.println("Poor");
			printGradeInfo(Grade.E);break;
			}
			sc.close();
		}
	}

	private static Grade getGrade(int score) {
		if(score>=90&&score<=100)
			return Grade.A;
		else if(score>=80&&score<90)
			return Grade.B;
		else if(score>=70&&score<80)
			return Grade.C;
		else if(score>=60&&score<70)
			return Grade.D;
		else
			return Grade.E;
	}
	public static void printGradeInfo(Grade grade){
		 System.out.println("class name="+Grade.class);
		 System.out.println("grade value="+grade);
	}
}